Use SHA-512 integrity in package locks - #14701
Open
Sean McManus (sean-mcmanus) wants to merge 4 commits into
Open
Use SHA-512 integrity in package locks#14701Sean McManus (sean-mcmanus) wants to merge 4 commits into
Sean McManus (sean-mcmanus) wants to merge 4 commits into
Conversation
Copilot started reviewing on behalf of
Sean McManus (sean-mcmanus)
August 21, 2026 21:32
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Upgrades dependency integrity and enforces reproducible dependency installation.
Changes:
- Migrates lockfile integrity values to SHA-512.
- Adds lockfile validation, updater tooling, and tests.
- Replaces mutable npm installs with
npm ci.
Reviewed changes
Copilot reviewed 29 out of 34 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
Themes/package-lock.json |
Migrates integrity hashes to SHA-512. |
Extension/readme.developer.md |
Documents verified Yarn bootstrap. |
Extension/package.json |
Adds lockfile scripts and bootstrap changes. |
Extension/.yarn-bootstrap/package-lock.json |
Upgrades Yarn integrity to SHA-512. |
Extension/.scripts/verifyYarnLock.test.mjs |
Tests lockfile integrity validation. |
Extension/.scripts/verifyYarnLock.mjs |
Validates Yarn and npm lockfiles. |
Extension/.scripts/updatePackageLockIntegrity.test.mjs |
Tests updater and atomic writes. |
Extension/.scripts/updatePackageLockIntegrity.mjs |
Adds byte-verifying lockfile updater. |
Extension/.scripts/subresourceIntegrity.mjs |
Parses and computes integrity values. |
Extension/.scripts/packageLockFiles.mjs |
Discovers repository package locks. |
Build/package/jobs_package_vsix.yml |
Uses frozen npm installation. |
.github/workflows/question-closer.yml |
Uses npm ci. |
.github/workflows/question-closer-debugger.yml |
Uses npm ci. |
.github/workflows/more-info-needed-closer.yml |
Uses npm ci. |
.github/workflows/more-info-needed-closer-debugger.yml |
Uses npm ci. |
.github/workflows/locker.yml |
Uses npm ci. |
.github/workflows/job-compile-and-test.yml |
Runs repository lock validation. |
.github/workflows/investigate-costing-closer-debugger.yml |
Uses npm ci. |
.github/workflows/investigate-closer-debugger.yml |
Uses npm ci. |
.github/workflows/feature-request-reopener.yml |
Uses npm ci. |
.github/workflows/feature-request-debugger.yml |
Uses npm ci. |
.github/workflows/feature-request-closer-triage.yml |
Uses npm ci. |
.github/workflows/feature-request-closer-no-milestone.yml |
Uses npm ci. |
.github/workflows/external-closer-debugger.yml |
Uses npm ci. |
.github/workflows/enhancement-reopener.yml |
Uses npm ci. |
.github/workflows/enhancement-closer-triage.yml |
Uses npm ci. |
.github/workflows/enhancement-closer-no-milestone.yml |
Uses npm ci. |
.github/workflows/duplicate-closer.yml |
Uses npm ci. |
.github/workflows/by-design-closer.yml |
Uses npm ci. |
.github/workflows/by-design-closer-debugger.yml |
Uses npm ci. |
.github/workflows/bug-debugger.yml |
Uses npm ci. |
Files not reviewed (1)
- Extension/.yarn-bootstrap/package-lock.json: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Copilot started reviewing on behalf of
Sean McManus (sean-mcmanus)
August 21, 2026 23:16
View session
Copilot started reviewing on behalf of
Sean McManus (sean-mcmanus)
August 21, 2026 23:46
View session
Copilot started reviewing on behalf of
Sean McManus (sean-mcmanus)
August 22, 2026 00:02
View session
Sean McManus (sean-mcmanus)
marked this pull request as ready for review
August 22, 2026 00:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrade dependency integrity from SHA-1-only values to SHA-512 across the Yarn and npm lockfiles. Add repository-wide validation and a byte-verifying npm lock updater, and make npm consumers use frozen installs so builds consume the reviewed dependency graph.
The updater fetches exact tarballs from the configured approved registry, verifies each existing SHA-1 value against the downloaded bytes, computes SHA-512 independently, and protects lockfile replacement against partial or concurrent writes.
Validation
git diff --check